Integrand size = 23, antiderivative size = 83 \[ \int \tan ^4(e+f x) \left (a+b \tan ^2(e+f x)\right )^p \, dx=\frac {\operatorname {AppellF1}\left (\frac {5}{2},1,-p,\frac {7}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a}\right ) \tan ^5(e+f x) \left (a+b \tan ^2(e+f x)\right )^p \left (1+\frac {b \tan ^2(e+f x)}{a}\right )^{-p}}{5 f} \]
[Out]
Time = 0.11 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3751, 525, 524} \[ \int \tan ^4(e+f x) \left (a+b \tan ^2(e+f x)\right )^p \, dx=\frac {\tan ^5(e+f x) \left (a+b \tan ^2(e+f x)\right )^p \left (\frac {b \tan ^2(e+f x)}{a}+1\right )^{-p} \operatorname {AppellF1}\left (\frac {5}{2},1,-p,\frac {7}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a}\right )}{5 f} \]
[In]
[Out]
Rule 524
Rule 525
Rule 3751
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {x^4 \left (a+b x^2\right )^p}{1+x^2} \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {\left (\left (a+b \tan ^2(e+f x)\right )^p \left (1+\frac {b \tan ^2(e+f x)}{a}\right )^{-p}\right ) \text {Subst}\left (\int \frac {x^4 \left (1+\frac {b x^2}{a}\right )^p}{1+x^2} \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {\operatorname {AppellF1}\left (\frac {5}{2},1,-p,\frac {7}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a}\right ) \tan ^5(e+f x) \left (a+b \tan ^2(e+f x)\right )^p \left (1+\frac {b \tan ^2(e+f x)}{a}\right )^{-p}}{5 f} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(1896\) vs. \(2(83)=166\).
Time = 13.89 (sec) , antiderivative size = 1896, normalized size of antiderivative = 22.84 \[ \int \tan ^4(e+f x) \left (a+b \tan ^2(e+f x)\right )^p \, dx=-\frac {2 \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-p,\frac {3}{2},-\frac {b \tan ^2(e+f x)}{a}\right ) \tan (e+f x) \left (a+b \tan ^2(e+f x)\right )^p \left (1+\frac {b \tan ^2(e+f x)}{a}\right )^{-p}}{f}+\frac {\tan (e+f x) \left (a+b \tan ^2(e+f x)\right )^p \left (1+\frac {b \tan ^2(e+f x)}{a}\right )^{-p} \left ((-a+b (3+2 p)) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-p,\frac {3}{2},-\frac {b \tan ^2(e+f x)}{a}\right )+\left (a+b \tan ^2(e+f x)\right ) \left (1+\frac {b \tan ^2(e+f x)}{a}\right )^p\right )}{b f (3+2 p)}+\frac {3 a \operatorname {AppellF1}\left (\frac {1}{2},-p,1,\frac {3}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right ) \cos (e+f x) \sin (e+f x) \left (a+b \tan ^2(e+f x)\right )^{2 p}}{f \left (3 a \operatorname {AppellF1}\left (\frac {1}{2},-p,1,\frac {3}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right )+2 \left (b p \operatorname {AppellF1}\left (\frac {3}{2},1-p,1,\frac {5}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right )-a \operatorname {AppellF1}\left (\frac {3}{2},-p,2,\frac {5}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right )\right ) \tan ^2(e+f x)\right ) \left (\frac {6 a b p \operatorname {AppellF1}\left (\frac {1}{2},-p,1,\frac {3}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right ) \tan ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )^{-1+p}}{3 a \operatorname {AppellF1}\left (\frac {1}{2},-p,1,\frac {3}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right )+2 \left (b p \operatorname {AppellF1}\left (\frac {3}{2},1-p,1,\frac {5}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right )-a \operatorname {AppellF1}\left (\frac {3}{2},-p,2,\frac {5}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right )\right ) \tan ^2(e+f x)}+\frac {3 a \operatorname {AppellF1}\left (\frac {1}{2},-p,1,\frac {3}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right ) \cos ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )^p}{3 a \operatorname {AppellF1}\left (\frac {1}{2},-p,1,\frac {3}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right )+2 \left (b p \operatorname {AppellF1}\left (\frac {3}{2},1-p,1,\frac {5}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right )-a \operatorname {AppellF1}\left (\frac {3}{2},-p,2,\frac {5}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right )\right ) \tan ^2(e+f x)}-\frac {3 a \operatorname {AppellF1}\left (\frac {1}{2},-p,1,\frac {3}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right ) \sin ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )^p}{3 a \operatorname {AppellF1}\left (\frac {1}{2},-p,1,\frac {3}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right )+2 \left (b p \operatorname {AppellF1}\left (\frac {3}{2},1-p,1,\frac {5}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right )-a \operatorname {AppellF1}\left (\frac {3}{2},-p,2,\frac {5}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right )\right ) \tan ^2(e+f x)}+\frac {3 a \cos (e+f x) \sin (e+f x) \left (\frac {2 b p \operatorname {AppellF1}\left (\frac {3}{2},1-p,1,\frac {5}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right ) \sec ^2(e+f x) \tan (e+f x)}{3 a}-\frac {2}{3} \operatorname {AppellF1}\left (\frac {3}{2},-p,2,\frac {5}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right ) \sec ^2(e+f x) \tan (e+f x)\right ) \left (a+b \tan ^2(e+f x)\right )^p}{3 a \operatorname {AppellF1}\left (\frac {1}{2},-p,1,\frac {3}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right )+2 \left (b p \operatorname {AppellF1}\left (\frac {3}{2},1-p,1,\frac {5}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right )-a \operatorname {AppellF1}\left (\frac {3}{2},-p,2,\frac {5}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right )\right ) \tan ^2(e+f x)}-\frac {3 a \operatorname {AppellF1}\left (\frac {1}{2},-p,1,\frac {3}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right ) \cos (e+f x) \sin (e+f x) \left (a+b \tan ^2(e+f x)\right )^p \left (4 \left (b p \operatorname {AppellF1}\left (\frac {3}{2},1-p,1,\frac {5}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right )-a \operatorname {AppellF1}\left (\frac {3}{2},-p,2,\frac {5}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right )\right ) \sec ^2(e+f x) \tan (e+f x)+3 a \left (\frac {2 b p \operatorname {AppellF1}\left (\frac {3}{2},1-p,1,\frac {5}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right ) \sec ^2(e+f x) \tan (e+f x)}{3 a}-\frac {2}{3} \operatorname {AppellF1}\left (\frac {3}{2},-p,2,\frac {5}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right ) \sec ^2(e+f x) \tan (e+f x)\right )+2 \tan ^2(e+f x) \left (b p \left (-\frac {6}{5} \operatorname {AppellF1}\left (\frac {5}{2},1-p,2,\frac {7}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right ) \sec ^2(e+f x) \tan (e+f x)-\frac {6 b (1-p) \operatorname {AppellF1}\left (\frac {5}{2},2-p,1,\frac {7}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right ) \sec ^2(e+f x) \tan (e+f x)}{5 a}\right )-a \left (\frac {6 b p \operatorname {AppellF1}\left (\frac {5}{2},1-p,2,\frac {7}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right ) \sec ^2(e+f x) \tan (e+f x)}{5 a}-\frac {12}{5} \operatorname {AppellF1}\left (\frac {5}{2},-p,3,\frac {7}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right ) \sec ^2(e+f x) \tan (e+f x)\right )\right )\right )}{\left (3 a \operatorname {AppellF1}\left (\frac {1}{2},-p,1,\frac {3}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right )+2 \left (b p \operatorname {AppellF1}\left (\frac {3}{2},1-p,1,\frac {5}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right )-a \operatorname {AppellF1}\left (\frac {3}{2},-p,2,\frac {5}{2},-\frac {b \tan ^2(e+f x)}{a},-\tan ^2(e+f x)\right )\right ) \tan ^2(e+f x)\right )^2}\right )} \]
[In]
[Out]
\[\int \tan \left (f x +e \right )^{4} \left (a +b \tan \left (f x +e \right )^{2}\right )^{p}d x\]
[In]
[Out]
\[ \int \tan ^4(e+f x) \left (a+b \tan ^2(e+f x)\right )^p \, dx=\int { {\left (b \tan \left (f x + e\right )^{2} + a\right )}^{p} \tan \left (f x + e\right )^{4} \,d x } \]
[In]
[Out]
\[ \int \tan ^4(e+f x) \left (a+b \tan ^2(e+f x)\right )^p \, dx=\int \left (a + b \tan ^{2}{\left (e + f x \right )}\right )^{p} \tan ^{4}{\left (e + f x \right )}\, dx \]
[In]
[Out]
\[ \int \tan ^4(e+f x) \left (a+b \tan ^2(e+f x)\right )^p \, dx=\int { {\left (b \tan \left (f x + e\right )^{2} + a\right )}^{p} \tan \left (f x + e\right )^{4} \,d x } \]
[In]
[Out]
\[ \int \tan ^4(e+f x) \left (a+b \tan ^2(e+f x)\right )^p \, dx=\int { {\left (b \tan \left (f x + e\right )^{2} + a\right )}^{p} \tan \left (f x + e\right )^{4} \,d x } \]
[In]
[Out]
Timed out. \[ \int \tan ^4(e+f x) \left (a+b \tan ^2(e+f x)\right )^p \, dx=\int {\mathrm {tan}\left (e+f\,x\right )}^4\,{\left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a\right )}^p \,d x \]
[In]
[Out]